import request from "@/utils/request";

// 新增日常打扫记录
export function addRoutineSweep(data) {
  return request({
    url: "/enterprise/house/sweep/routineSweep",
    method: "post",
    data: data,
  });
}

// 新增换退打扫记录 (房态新增打扫)
export function addSweep(data) {
  return request({
    url: "/enterprise/house/sweep",
    method: "post",
    data: data,
  });
}

// 新增同一人验房打扫
export function addSweepInspection(data) {
  return request({
    url: "/enterprise/house/inspection/sweepAndInspection",
    method: "post",
    data: data,
  });
}

// 打扫列表
export function listSweep(params) {
  return request({
    url: "/enterprise/house/sweep/list",
    method: "get",
    params: params,
  });
}

//查询打扫人员信息
export function getCleanerUserInfo(params) {
  return request({
    url: "/enterprise/cleaner/cleaner/cleanerUserInfo",
    method: "get",
    params: params,
  });
}

// 指定打扫人员
export function assignSweep(data) {
  return request({
    url: "/enterprise/house/sweep",
    method: "put",
    data: data,
  });
}

// 更换打扫人员
export function changeSweep(data) {
  return request({
    url: "/enterprise/house/sweep/change",
    method: "put",
    data: data,
  });
}

// 获取打扫记录详细信息（路径后面打扫id）
export function getSweep(id) {
  return request({
    url: "/enterprise/house/sweep/" + id,
    method: "get",
  });
}

// 删除打扫记录（路径后面传打扫记录id）
export function deleteSweep(id) {
  return request({
    url: "/enterprise/house/sweep/" + id,
    method: "delete",
  });
}
